package com.hspedu.Enumeration;

enum  Season{
    SPRING("春天","春意盎然"),SUMMER("夏天","炎热");
    private String name;
    private String desc;//描述
//
//    public static final Season SPRING=new Season("春天","春意盎然");
//    public static  final Season summer=new Season("夏天","炎热难耐");
//
//1 使用关键字enum代替class
    //2   public static final Season SPRING=new Season("春天","春意盎然");
    //代替成SPRING（"春天“，”温暖‘）
    //3，如果有多个常量（对象）使用逗号隔开
    //3 如果使用enum来实现枚举要求将定义常量对象写在前面

    Season(String name, String desc) {
        this.name = name;
        this.desc = desc;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getDesc() {
        return desc;
    }

    public void setDesc(String desc) {
        this.desc = desc;
    }

    @Override
    public String toString() {
        return "Season{" +
                "name='" + name + '\'' +
                ", desc='" + desc + '\'' +
                '}';
    }
}

public class Enumeration {


    public static void main(String[] args) {
        System.out.println(  Season.SPRING);

    }
}